{template /common/header}
<style type="text/css">
.tishi{width:80%;margin:10px auto 0;padding:10px 15px;background:#fdf4d6;border:1px solid #f8d1b3;color:#c40000;line-height:20px; padding-bottom:10px;}
.tishi strong{ display:block;font-weight:bold;}
.ckjilu30 {
	float: left;
	font-size: 14px;
	color: #FFFFFF;
	display: block;
	height: 30px;
	width: 120px;
	background-color: #333333;
	line-height: 30px;
	text-align: center;
	margin-top: 15px;
	margin-bottom: 15px;
	border-radius:3px;
	margin-left:20px;
}
.ckjilu30 a {
	background-color: #FF0000;
	display: block;
	color: #FFFFFF;
	text-decoration: none;
	border-radius:3px;
}
.ckjilu30 a:hover {
	background-color: #000000;
	display: block;
	border-radius:3px;
}
</style>
    <div class="main">
		<div class="login">
        	<ul>
            	<li>
                	<input type="password" placeholder="请输入当前密码" name="pwd" class="input_3" />
                </li>
                <li>
                	<input type="password" placeholder="请输入新密码" name="newpwd" class="input_3" />
                </li>
                <li>
                	<input type="password" placeholder="请再次输入新密码" name="newpwd2" class="input_3" />
                    <p>&nbsp;</p>
                </li>
        
                <li><input type="button" value="保存密码" class="btnBlue" id="dosubmit" /></li>
            </ul>
            </div>
             <div class="clear"></div>
    </div>

<script type="text/javascript">
setTitle('登录密码修改-账户安全');
var referer = "{U('User/User/userinfo')}";
/* 保存修改 */
$('#dosubmit').bind('click',function(){
    if ($('input[name="pwd"]').val() == '') {
        hd_alert('请输入旧密码');
        return false;
    }
    $.post('{U("User/User/security")}',{
        pwd : $('input[name="pwd"]').val(),
        newpwd : $('input[name="newpwd"]').val(),
        newpwd2 : $('input[name="newpwd2"]').val()
    },function(data){
        if (data.status == 1) {
            hd_alert(data.info);
            location.href = data.url;
        }else{
            hd_alert(data.info);
            location.reload();
        }            
    },'JSON');
})
</script>
   
{template /common/footer}